package org.fer.solution;

import org.fer.solution.task.TaskProgress;

import android.app.Activity;
import android.app.ProgressDialog;
import android.os.Bundle;

public class AsyncTaskActivity extends Activity {

	private ProgressDialog dialog;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.asynctask);

		dialog = new ProgressDialog(this);
		dialog.setMessage("Descargando...");
		dialog.setTitle("Progreso");
		dialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
		dialog.setCancelable(false);

		TaskProgress tp = new TaskProgress();
		tp.setProgressDialog(dialog);
		tp.execute("http://www.ejemplo.com/file.zip");

	}

}
